package com.lx;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        //获取spring的上下文对象
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-bean.xml");
        //对象现在都在spring中管理，要使用直接从里面取
        Hello hello = (Hello) context.getBean("hello");
        System.out.println(hello);
    }
}
